/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import generica.Generica;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 *
 * @author calandreli
 */
@Entity
@Table(name = "origem")
@SequenceGenerator(name = "origem_seq", sequenceName = "id_Origem", allocationSize = 1)
public class Origem implements Generica {

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "origem_seq")
    @Column(name = "id_Origem")
    private int id_Origem;
    @Column(name = "nome")
    private String nome;

    public int getId_Origem() {
        return id_Origem;
    }

    public void setId_Origem(int id_Origem) {
        this.id_Origem = id_Origem;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    @Override
    public Serializable getIdentificador() {
        return this.id_Origem;
    }

    @Override
    public String toString() {
        return nome;
    }

}
